#include "add_contact_request.pb.h"
#include "add_contact_response.pb.h"
#include "find_one_contact_request.pb.h"
#include "find_one_contact_response.pb.h"
#include "find_all_contacts_response.pb.h"
#include "del_contact_request.pb.h"
#include "del_contact_response.pb.h"

set(COM_SRC_LIST
    add_contact_request.pb.cc
    add_contact_response.pb.cc
    find_one_contact_request.pb.cc
    find_one_contact_response.pb.cc
    find_all_contacts_response.pb.cc
    del_contact_request.pb.cc
    del_contact_response.pb.cc
    base_response.pb.cc)

add_executable(client ${COM_SRC_LIST} client.cc ContactsClient.cc)
add_executable(server ${COM_SRC_LIST} server.cc ContactsServer.cc 
               ContactsMapper.cc contacts.pb.cc)

target_link_libraries(client protobuf pthread)
target_link_libraries(server protobuf pthread)